{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import warnings\n",
    "import networkx as nx\n",
    "import scipy.io\n",
    "import matplotlib.pyplot as plt\n",
    "from src import Classifier\n",
    "from gensim.models import Word2Vec\n",
    "from gensim.models import KeyedVectors"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "def parse_mat_file(path):\n",
    "    \n",
    "    edges = []\n",
    "    g = nx.Graph()\n",
    "    mat = scipy.io.loadmat(path)\n",
    "    nodes = mat['network'].tolil()\n",
    "    subs_coo = mat['group'].tocoo()\n",
    "    \n",
    "    for start_node,end_nodes in enumerate(nodes.rows, start=0):\n",
    "        for end_node in end_nodes:\n",
    "            edges.append((start_node,end_node))\n",
    "    \n",
    "    g.add_edges_from(edges)\n",
    "    g.name = path\n",
    "    print(nx.info(g) + \"\\n---------------------------------------\\n\")\n",
    "        \n",
    "    return g, subs_coo\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "def load_embeddings(fname):\n",
    "    try:\n",
    "        word_vec = KeyedVectors.load_word2vec_format(fname, binary=False)\n",
    "        print(\"Embeddings successfully loaded from \"+fname)\n",
    "        return word_vec, True\n",
    "    except IOError:\n",
    "        print(\"Embedding file not found. Proceeding to generate new embeddings\")\n",
    "        # Y/N here\n",
    "        return _, False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "def eval_classifier(G, subs_coo, word_vec):\n",
    "    #Sometimes the model doesn't predict anything at all for some inputs. Its either the model's fault or that user has no subscriptions at\n",
    "    #all, in that case the model is predicting properly but of course a zero output would raise exceptions during sklearn's\n",
    "    #F1 score function.\n",
    "    #Currently evaluating performance with OVR Logistic Regression.\n",
    "    print(\"\\t**Evaluating classifier performance with the embeddings**\")\n",
    "\n",
    "    results = Classifier.evaluate(G, subs_coo, word_vec)\n",
    "    \n",
    "    print(\"\\n Evaluation completed using the following:\")\n",
    "    for i in results.keys():\n",
    "        print(\"--> \",i)\n",
    "    \n",
    "    print(\"\\nPrinting evaluation results : \")\n",
    "    trainsize = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]\n",
    "    for (name,res) in results.items():\n",
    "        print(\"\\n\\nClassifier : \",name)\n",
    "        for (tr_size,res_) in zip(trainsize,res):\n",
    "            print(\"\\tTraining size : \",tr_size)\n",
    "            print(\"\\t\\tMicro F1: \",res_[0])\n",
    "            print(\"\\t\\tMacro F1: \",res_[1])\n",
    "        \n",
    "        avg = np.average(res,axis=0)\n",
    "        print(\"\\t---------------------------------------\")\n",
    "        print(\"\\t Average Micro F1 : \",avg[0])\n",
    "        print(\"\\t Average Macro F1 : \",avg[1])\n",
    "        Classifier.plot_graph(trainsize, res)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Name: graph/blogcatalog.mat\n",
      "Type: Graph\n",
      "Number of nodes: 10312\n",
      "Number of edges: 333983\n",
      "Average degree:  64.7756\n",
      "---------------------------------------\n",
      "\n",
      "Embeddings successfully loaded from embeddings/blogcatalog_embeddings_dim-128_p-0.25_q-0.25.txt\n",
      "\t**Evaluating classifier performance with the embeddings**\n",
      "\n",
      " Evaluation completed using the following:\n",
      "-->  Logistic_Regression\n",
      "\n",
      "Printing evaluation results : \n",
      "\n",
      "\n",
      "Classifier :  Logistic_Regression\n",
      "\tTraining size :  0.1\n",
      "\t\tMicro F1:  0.34414041542116963\n",
      "\t\tMacro F1:  0.20663374057704248\n",
      "\tTraining size :  0.2\n",
      "\t\tMicro F1:  0.3672887506480041\n",
      "\t\tMacro F1:  0.23200387853794346\n",
      "\tTraining size :  0.3\n",
      "\t\tMicro F1:  0.3898456057007126\n",
      "\t\tMacro F1:  0.2582933405279603\n",
      "\tTraining size :  0.4\n",
      "\t\tMicro F1:  0.39072771306654364\n",
      "\t\tMacro F1:  0.26335774887371927\n",
      "\tTraining size :  0.5\n",
      "\t\tMicro F1:  0.3962577962577963\n",
      "\t\tMacro F1:  0.26816355803585873\n",
      "\tTraining size :  0.6\n",
      "\t\tMicro F1:  0.4051664355062413\n",
      "\t\tMacro F1:  0.2866259781575974\n",
      "\tTraining size :  0.7\n",
      "\t\tMicro F1:  0.4062863795110594\n",
      "\t\tMacro F1:  0.2854694389753483\n",
      "\tTraining size :  0.8\n",
      "\t\tMicro F1:  0.4138413142257952\n",
      "\t\tMacro F1:  0.30033748073597355\n",
      "\tTraining size :  0.9\n",
      "\t\tMicro F1:  0.41885187810063784\n",
      "\t\tMacro F1:  0.29869503164688727\n",
      "\t---------------------------------------\n",
      "\t Average Micro F1 :  0.39248958760421776\n",
      "\t Average Macro F1 :  0.2666200217853701\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEKCAYAAADjDHn2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3Xl8VOX1x/HPIaxCQEQICkhAqYqKbLJYFfJTEZSCCyKoKKJS/IlrrdparWuLaLVupVr3DYq2Kj/FYquJ4lYBxQ0U0AYBiwiI7Ftyfn88EzIJSWayTGaSfN+v133NvXeeO3My6Jy5z3PveczdERERKUu9ZAcgIiKpT8lCRERiUrIQEZGYlCxERCQmJQsREYlJyUJERGJSshARkZiULEREJCYlCxERial+sgOoKnvvvbdnZmZW+PhNmzbRtGnTqguoiiiu8lFc5aO4yqc2xjVv3rzV7t46ZkN3rxVLr169vDKys7MrdXyiKK7yUVzlo7jKpzbGBcz1OL5j1Q0lIiIxKVmIiEhMShYiIhJTrRngLsmOHTtYvnw5W7dujdm2RYsWLFy4sBqiKp9kx9W4cWPat29PgwYNkhaDiCRfrU4Wy5cvJz09nczMTMyszLYbNmwgPT29miKLXzLjcnfWrFnD8uXL6dSpU1JiEJHUUKu7obZu3UqrVq1iJgopmZnRqlWruM7MRKR6tW0LZmHJyhq4a71t28S8X61OFoASRSXp8xNJTd99V779lVWru6FERGobd1i9uvrft9afWSSbmXH22Wfv2t65cyetW7dm6NChAMyYMYNJkyZV+fsOHDiQAw88kO7du9O9e3eef/55AMaNG0ebNm049NBDq/w9RaTy8vPh22/h3Xdh6lSYNAkmTIAhQ+Dgg6FpU2jTpvrj0plFxAEHNGXVqt33Z2TAypUVf92mTZvy2WefsWXLFpo0acI///lP2rVrt+v5YcOGMWzYsLhea9edlPXiy/HPPPMMvXv3LrJv7NixTJw4kXPOOSf+P0JEqszOnbBiBSxdCrm5RR+XLoVvvoHt24se06oVdOwYksWQIWH98surN24li4hVq0r+Aq6K/r8TTzyRV155hREjRjB16lRGjx7N7NmzAXj88ceZO3cu999/P9999x0TJkzg66+/BmDKlCk0b96c0047jb59+zJv3jxmzpzJu+++y+9+9zvcnZNOOonbb7897liOOeYYcnNzK/9HidQRbdtGfw8M3LW/tB+S27bBsmWFX/7FE8Ly5ZCXV/SYjAzIzISePeHUU0My6Ngx7OvYEZo12/19lCwS5PLLYf78ih07cGDJ+7t3hz/+Mfbxo0aN4uabb2bo0KF88sknjBs3bleyiHbppZcyYMAAXnjhBfLy8ti4cSPLli1j8eLFPPHEE/Tr149vv/2Wa665hnnz5tGyZUsGDRrEiy++yMknn7zb65111lk0adIEgNdff51WrVqV588WEcoeSH7wwaJnBbm58N//hnGFAmbQrl344j/qqKJJIDMT9tsPGjcuf1wZGSXHlpFR/teKR51JFsnUrVs3cnNzmTp1KieeeGKp7d544w2efPJJANLS0mjRogXLli2jY8eO9OvXD4A5c+YwcOBAWrcORSLPOuss3nrrrRKTRUndUCISn82b4bPPym4zYQLUrw8dOoQv/kGDiiaDjh2hfXto2LDq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Q0syauPuWUmIUiYuShdR1mwpWzKwLcBnQx93XmdnThGqixW2PWs+j9P+PtsXRplQeJuL6JDLF6UKKJQsza0eYsW2oF06OZZH4tyNShdQNJVKoObABWG9m+wAnJOA93iF0D2FmhxHOXIows+aRM4YC3YGlxdo0JEyh+Qt3XxL11L+Ai6PaFR8PEakQJQuRQh8Supy+IMzD/k4C3uM+oJ2ZLQB+G3m/H4u1MeBXkYHx+YQJpYqPixxNGO+4LWqQuw0hUfw0MhPfAsJ0qSKVpktnRaqRmdUH6rv71ki312uEOUF2Jjk0kTJpzEKkejUDXo8kDQN+rkQhNYHOLEREJCaNWYiISExKFiIiEpOShYiIxKRkISIiMSlZiIhITEoWIiIS0/8DrBKPGI6f3LsAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x106456cf8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "warnings.filterwarnings(\"ignore\")\n",
    "G, subs_coo = parse_mat_file('graph/blogcatalog.mat')\n",
    "embeddings, _ = load_embeddings('embeddings/blogcatalog_embeddings_dim-128_p-0.25_q-0.25.txt')\n",
    "eval_classifier(G, subs_coo, embeddings)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
